<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--

    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.

-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<title>Project Properties: Formatting</title>
<link rel="stylesheet" href="ide.css" title="Oracle BLAFDoc" type="text/css"/>
</head>

<body>
<p><a id="org.netbeans.modules.editor.indent.project.FormattingCustomizerPanel" name="org.netbeans.modules.editor.indent.project.FormattingCustomizerPanel"></a></p>
<div id="NBCSH538"><!-- infolevel="all" infotype="General" --><a id="sthref49" name="sthref49"></a>
<h1>Project Properties: Formatting</h1>
<a name="BEGIN" id="BEGIN"></a>
<p>In this panel you define the formatting style that you want to apply to your source files in the editor. By default the IDE uses the global settings for formatting that you specify in the Options window.</p>
<p>Select <b>Use Project-Specific Options</b> in this panel to override the global formatting settings and specify the options for this project only. 
<object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer">
<param name="content" value="http://www.oracle.com/pls/topic/lookup?ctx=nb8200&id=NBDAG2415">
<param name="text" value="<html><u>How?</u></html>">
<param name="textFontSize" value="medium">
<param name="textColor" value="blue">
</object>
</p>

<table summary="User interface elements and descriptions" dir="ltr" border="1" width="100%" frame="hsides" rules="groups" cellpadding="3" cellspacing="0">
<col width="24%" />
<col width="*" />
<thead>
<tr align="left" valign="top">
<th align="left" valign="bottom" id="r1c1-t55">Element</th>
<th align="left" valign="bottom" id="r1c2-t55">Description</th>
</tr>
</thead>
<tbody>
<tr align="left" valign="top">
<td align="left" id="r2c1-t55" headers="r1c1-t55">
<p>Use global options</p>
</td>
<td align="left" headers="r2c1-t55 r1c2-t55">Select this option to use the global IDE formatting options for the current project. You define global IDE formatting options in the Options window. 
<object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer">
<param name="content" value="http://www.oracle.com/pls/topic/lookup?ctx=nb8200&id=NBDAG2297">
<param name="text" value="<html><u>How?</u></html>">
<param name="textFontSize" value="medium">
<param name="textColor" value="blue">
</object>
</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r3c1-t55" headers="r1c1-t55">
<p>&nbsp;&nbsp;&nbsp;&nbsp;Edit global options</p>
</td>
<td align="left" headers="r3c1-t55 r1c2-t55">This button is enabled when you select Use Global Options. Click to open the global Editor Options for the IDE. Select the Formatting tab in the Editor Options. The UI for the Formatting tab is the same as the UI for the Formatting project properties.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r4c1-t55" headers="r1c1-t55">
<p>Use project-specific options</p>
</td>
<td align="left" headers="r4c1-t55 r1c2-t55">Select this option to configure specific formatting options and apply them to the current project. You can choose to load formatting options from other projects or manually specify the options in this panel.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r5c1-t55" headers="r1c1-t55">
<p>&nbsp;&nbsp;&nbsp;&nbsp;Load from other project</p>
</td>
<td align="left" headers="r5c1-t55 r1c2-t55">This button is enabled when you select Use project-specific options. Click to select a project and load the project-specific options from the project.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r6c1-t55" headers="r1c1-t55">
<p>Language</p>
</td>
<td align="left" headers="r6c1-t55 r1c2-t55">Select a language from the dropdown list. The languages available in the dropdown list will depend upon the languages used by the current project.
<p>All Languages refer to all languages except C++.</p>
</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r7c1-t55" headers="r1c1-t55">
<p>Category</p>
</td>
<td align="left" headers="r7c1-t55 r1c2-t55">Select a category from the dropdown list. If you selected All Languages, the only Category of options is Tabs and Indents.
<p>The categories that are available in the dropdown list depend upon the language that is selected.</p>
</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r8c1-t55" headers="r1c1-t55">
<p>&nbsp;&nbsp;&nbsp;&nbsp;Tabs and Indents</p>
</td>
<td align="left" headers="r8c1-t55 r1c2-t55">Select this category to specify the values for tabs and indentations in the editor.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r9c1-t55" headers="r1c1-t55">
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Use All Languages Settings</p>
</td>
<td align="left" headers="r9c1-t55 r1c2-t55">When selected the editor uses the tab and indentation values that are specified for All Languages.
<p>This option is only available when a specific language is selected.</p>
</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r10c1-t55" headers="r1c1-t55">
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Expand Tabs to Spaces</p>
</td>
<td align="left" headers="r10c1-t55 r1c2-t55">When selected, inserts spaces when the Tab key is typed. When unselected, typing the Tab key inserts the tab character (\t) into the file if possible. It also replaces preceding spaces with the tab character if possible. The Source Editor calculates where to place tab characters based on the value of the Tab Size property.
<p>If Expand Tabs to Spaces is unselected and the Number of Spaces per Indent is different than the Tab Size property, the indentation created by typing the Tab key is made up of a combination of spaces and tab characters. It is easiest to predict the location of tab characters if you set Number of Spaces per Indent to an even multiple or divisor of Tab Size.</p>
<p>Important: This feature does not convert existing tabs to spaces. Only tabs that you add after you enable this option are converted.</p>
</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r11c1-t55" headers="r1c1-t55">
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Indent</p>
</td>
<td align="left" headers="r11c1-t55 r1c2-t55">Number of spaces per indentation level for subelements, new lines inside brackets, etc.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r12c1-t55" headers="r1c1-t55">
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tab size</p>
</td>
<td align="left" headers="r12c1-t55 r1c2-t55">See the description of Expand Tabs to Spaces, above.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r13c1-t55" headers="r1c1-t55">
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Right margin</p>
</td>
<td align="left" headers="r13c1-t55 r1c2-t55">Position of the vertical red line that indicates the right margin.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r14c1-t55" headers="r1c1-t55">
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Line wrap</p>
</td>
<td align="left" headers="r14c1-t55 r1c2-t55">Whether lines are wrapped when they are longer than the width of the Editor window (no relationship to right margin). Options are:</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r15c1-t55" headers="r1c1-t55">
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Off</p>
</td>
<td align="left" headers="r15c1-t55 r1c2-t55">No line wrapping (default).</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r16c1-t55" headers="r1c1-t55">
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;After words</p>
</td>
<td align="left" headers="r16c1-t55 r1c2-t55">Words are not broken by line wrapping.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r17c1-t55" headers="r1c1-t55">
<p>Anywhere</p>
</td>
<td align="left" headers="r17c1-t55 r1c2-t55">Lines are broken in the middle of words by line wrapping.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r18c1-t55" headers="r1c1-t55">
<p>Alignment</p>
</td>
<td align="left" headers="r18c1-t55 r1c2-t55">Specify which elements should be aligned after a line break.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r19c1-t55" headers="r1c1-t55">
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;New Lines</p>
</td>
<td align="left" headers="r19c1-t55 r1c2-t55">The IDE breaks lines before any elements you select here.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r20c1-t55" headers="r1c1-t55">
<p>Group Multiline Alignment</p>
</td>
<td align="left" headers="r20c1-t55 r1c2-t55">Aligns the selected character horizontally across all lines in a group. A group is defined as a number of lines that contain the same type of assignments. The group can be terminated by an empty line, a line with only a comment, a different expression, or the end of a block.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r21c1-t55" headers="r1c1-t55">
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Assignment</p>
</td>
<td align="left" headers="r21c1-t55 r1c2-t55">Affects position of the equal sign character = in a group of lines with assignments. When you set this to 'on', the assignment char '=' is aligned after the longest identifier in a group. This formatting option works for variable assignments, field initializations, and constants.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r22c1-t55" headers="r1c1-t55">
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Array Initializer</p>
</td>
<td align="left" headers="r22c1-t55 r1c2-t55">Affects position of the initializer characters =&gt; in a group of lines.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r23c1-t55" headers="r1c1-t55">
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Multiline Alignment</p>
</td>
<td align="left" headers="r23c1-t55 r1c2-t55">Use if you set lines to wrap automatically at an element and you want that element to be aligned vertically.
<p>Requires that <b>wrapping</b> is enabled for the element before you select the element in this dialog.</p>
</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r24c1-t55" headers="r1c1-t55">
<p>&nbsp;&nbsp;&nbsp;&nbsp;Braces</p>
</td>
<td align="left" headers="r24c1-t55 r1c2-t55">Select where to place the braces for each type of statement listed in this dialog. Use the Format function (Alt+Shift+F) to apply the Braces settings to a PHP document.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r25c1-t55" headers="r1c1-t55">
<p>&nbsp;&nbsp;&nbsp;&nbsp;Blank Lines</p>
</td>
<td align="left" headers="r25c1-t55 r1c2-t55">Improves readability by setting off sections of code that are logically related according to the specified options. Select the number of blank lines to place in the listed positions.
<p>In the PHP editor, you also have the option to Group Fields Without PHP Doc. This is selected by default. When you select this option, there are no blank lines between fields that do not have PHPDoc documentation.</p>
</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r26c1-t55" headers="r1c1-t55">
<p>Spaces</p>
</td>
<td align="left" headers="r26c1-t55 r1c2-t55">In this panel, set where the IDE automatically puts whitespaces. Due to the large number of possible places to put whitespaces, the places to put whitespaces are displayed in a tree of categories. Expand a tree node to see the places under a category, or collapse a node to hide the places under a category.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r27c1-t55" headers="r1c1-t55">
<p>Wrapping</p>
</td>
<td align="left" headers="r27c1-t55 r1c2-t55">In this panel set the rules for the IDE to wrap lines automatically. The panel lists the possible elements before which the IDE wraps lines. For each element you can have the IDE never wrap lines, always wrap lines, or wrap lines if the statement is long (wider than the Editor window).
<p>You can also have the IDE automatically wrap lines after opening and before closing block braces, and between statements that are typed on the same line. Both of these options are enabled by default.</p>
</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r28c1-t55" headers="r1c1-t55">
<p>Uses</p>
</td>
<td align="left" headers="r28c1-t55 r1c2-t55">In this panel you can set options for formatting Use statements and generated names.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r29c1-t55" headers="r1c1-t55">
<p>Comments</p>
</td>
<td align="left" headers="r29c1-t55 r1c2-t55">In this panel you can set the options for editing and displaying comments in your source code.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r30c1-t55" headers="r1c1-t55">
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Enable Comments Formatting</p>
</td>
<td align="left" headers="r30c1-t55 r1c2-t55">Deselect to disable comments formatting. Selecting Enable Comments Formatting enables the following fields:General. Selected options specify the style of implementing general code comments.Javadoc. Selected options specify the style of implementing comments for Javadoc.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r31c1-t55" headers="r1c1-t55">
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;General</p>
</td>
<td align="left" headers="r31c1-t55 r1c2-t55">Selected options specify the style of implementing general code comments.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r32c1-t55" headers="r1c1-t55">
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Javadoc</p>
</td>
<td align="left" headers="r32c1-t55 r1c2-t55">Selected options specify the style of implementing comments for Javadoc.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r33c1-t55" headers="r1c1-t55">
<p>&nbsp;&nbsp;&nbsp;&nbsp;Imports</p>
</td>
<td align="left" headers="r33c1-t55 r1c2-t55">In this panel you can set options for formatting import statements.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r34c1-t55" headers="r1c1-t55">
<p>Use Single Class Imports</p>
</td>
<td align="left" headers="r34c1-t55 r1c2-t55">Select to import only a particular class from a package during import optimization and code generation. Specify the following import options:</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r35c1-t55" headers="r1c1-t55">
<p>Import Inner Classes</p>
</td>
<td align="left" headers="r35c1-t55 r1c2-t55">When selected, the IDE creates imports for the inner classes referenced in your code.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r36c1-t55" headers="r1c1-t55">
<p>Class Count To Use Star Import</p>
</td>
<td align="left" headers="r36c1-t55 r1c2-t55">Number of classes to be imported from a single package until all statements importing a single class are substituted with a statement importing an entire package.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r37c1-t55" headers="r1c1-t55">
<p>Members Count To Use Static Star Import</p>
</td>
<td align="left" headers="r37c1-t55 r1c2-t55">Number of static import statements that are allowed for static members of the same type before type is used.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r38c1-t55" headers="r1c1-t55">
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Packages To Use Star Import</p>
</td>
<td align="left" headers="r38c1-t55 r1c2-t55">Specify a list of packages to be imported completely. Click Add to specify the package name or Remove to delete the currently selected entry from the list.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r39c1-t55" headers="r1c1-t55">
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Use Package Imports</p>
</td>
<td align="left" headers="r39c1-t55 r1c2-t55">Select to import packages during import optimization and code generation.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r40c1-t55" headers="r1c1-t55">
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Use Fully Qualified Names:</p>
</td>
<td align="left" headers="r40c1-t55 r1c2-t55">Select to use the fully qualified name of the class during import optimization and code generation.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r41c1-t55" headers="r1c1-t55">
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Import Layout</p>
</td>
<td align="left" headers="r41c1-t55 r1c2-t55">Specify how import statements should be organized in your code:</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r42c1-t55" headers="r1c1-t55">
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Separate Static Imports</p>
</td>
<td align="left" headers="r42c1-t55 r1c2-t55">When selected, static imports are kept in a separate section. Click Add to add a package name to the list. Click Move Up and Move Down to position certain entries first, or last, or one after another in the list. Click Remove to delete the currently selected entry from the list.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r43c1-t55" headers="r1c1-t55">
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Separate Groups</p>
</td>
<td align="left" headers="r43c1-t55 r1c2-t55">When selected, imported classes are grouped as per their packages and sorted alphabetically within a package.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r44c1-t55" headers="r1c1-t55">
<p>&nbsp;&nbsp;&nbsp;&nbsp;Naming</p>
</td>
<td align="left" headers="r44c1-t55 r1c2-t55">In this panel you can specify prefixes and suffixes for the names of generated variables.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r45c1-t55" headers="r1c1-t55">
<p>&nbsp;&nbsp;&nbsp;&nbsp;Ordering</p>
</td>
<td align="left" headers="r45c1-t55 r1c2-t55">In this panel you can select the order of generated elements.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r46c1-t55" headers="r1c1-t55">
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Members Sort Order</p>
</td>
<td align="left" headers="r46c1-t55 r1c2-t55">Define the order in which the IDE inserts the generated code elements. Select a member in the list and use the Move Up and Move Down buttons to specify the order that you want the elements.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r47c1-t55" headers="r1c1-t55">
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sort Members by Visibility</p>
</td>
<td align="left" headers="r47c1-t55 r1c2-t55">When selected, the IDE sorts generated class members by the visibility modifier. Select a member in the list and use the Move Up and Move Down buttons to place the elements in the desired order.</td>
</tr>
<tr align="left" valign="top">
<td align="left" id="r48c1-t55" headers="r1c1-t55">
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Insertion Point</p>
</td>
<td align="left" headers="r48c1-t55 r1c2-t55">Select where you want the generated elements placed in the code.</td>
</tr>
</tbody>
</table>
<br />
<!-- -->
<a id="NBCSH586" name="NBCSH586"></a>
<hr><p><b>Related Topics</b></p>
<p><i>Developing Applications with NetBeans IDE</i>, 
<object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer">
<param name="content" value="http://www.oracle.com/pls/topic/lookup?ctx=nb8200&id=NBDAG217">
<param name="text" value="<html><u>&quot;Working with Source Files in NetBeans IDE&quot;</u></html>">
<param name="textFontSize" value="medium">
<param name="textColor" value="blue">
</object>
</p>

<!-- -->
<!-- Start Footer -->


<table summary="" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td align="left" width="86%"><a href="legal_notice.htm">
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements; and to You under the Apache License, Version 2.0.</a>
</td>
</tr>
</table>
<!-- -->
</body>
</html>
